package com.py.androidUtils.UI;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;

import com.py.androidUtils.base.BaseActivity;
import com.readyidu.app.R;

public class EditTypeActivity extends BaseActivity {
	private EditText edType;

	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		setContentView(R.layout.activity_edit_type);
		edType = (EditText) this.findViewById(R.id.edType);
		getTitleActionBar().setTitleBar("");
		getTitleActionBar().setImgLeft(R.drawable.icon_back, new OnClickListener() {
			@Override
			public void onClick(View v) {
				finishactivity(EditTypeActivity.this);
			}
		});
		getTitleActionBar().setTvRight1("发布", new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = getIntent();
				intent.putExtra("typeName", edType.getText().toString());
				setResult(RESULT_OK, intent);
				finishactivity(EditTypeActivity.this);
			}
		});
	}
}
